import ConfirmVue from './confirm.vue';
import Popup from '@/components/popup/popup.js';
import Vue from 'vue';

class Confirm extends Popup {
	constructor(action, options) {
		super(ConfirmVue, {
			action,
			options
		});
	}
}

const confirmApi = (action, options) => {
	new Confirm(action, options).open();
};

Vue.confirm = Vue.prototype.$confirm = confirmApi;
export default confirmApi;